cc.Class({
    extends: cc.Component,

    properties: {
        scoreLable: cc.Label,
        highScoreLable: cc.Label,
        
    },

  
    onLoad: function () {
        this.score = cc.mydata.score;
        this.scoreLable.string = "score:" + cc.mydata.score;

        this.highScore = (cc.sys.localStorage.getItem("aaaaaa") || 0);
        if(this.score > Number(this.highScore)){
            cc.sys.localStorage.setItem("aaaaaa",this.score) ;
            this.highScore = this.score;
        }

        this.highScoreLable.string = "HIGHSCORE:" + this.highScore;

    },

    onButtonClicked:function(){
        cc.director.loadScene("game");
    },

    update: function (dt) {

     },
});
